void main(List<String> args) {
  Circle circle = Circle();
  circle.name = '圆';
  circle.show();
  circle.r = 2;
  print(circle.area());

  Rect rect = Rect(10.9 , 13.8);
  rect.name = '长方形';
  rect.show();
  print(rect.area);
}
/*
*父类
**/
class Shape {
  String name = '形状';
  void show(){
    print(name);
  }
}
/**
 * 子类
 * 圆
 */
class Circle extends Shape {
  double r = 1.0;
  double area(){
    return 3.14*r*r;
  }
}

/**
 * 矩形
 */
class Rect extends Shape{
  double w = 1.0;
  double h = 2.0;
  Rect(this.w,this.h);
  get area{
    return this.w*this.h;
  } //使用访问器
}